import uuid
import datetime
from sqlalchemy import Column, Integer, String, ForeignKey, DateTime
from sqlalchemy.orm import declarative_base
from sqlalchemy.dialects.postgresql import UUID, BOOLEAN

Base = declarative_base()

class mCustomer(Base):
    __tablename__ = 'customers'
    __table_args__ = {'schema': 'app_customers'}

    #id = Column(Integer, primary_key=True)
    id = Column(UUID(as_uuid=True), primary_key=True, default=uuid.uuid4)
    name = Column(String)
    surname = Column(String)
    email = Column(String)
    passport = Column(String)
    phone = Column(String)
    pwd = Column(String)
    created_at = Column(DateTime, default = datetime.datetime.now)
    updated_at = Column(DateTime, onupdate = datetime.datetime.now)
    is_active = Column(BOOLEAN, default=True)

'''
class Post(Base):
    __tablename__ = 'posts'

    id = Column(Integer, primary_key=True)
    title = Column(String)
    content = Column(String)
    user_id = Column(Integer, ForeignKey('users.id'))
'''